package com.jiang.factory;

public class ServiceFactory {

	// 构造函数私有化
	private ServiceFactory(){
		
	}
	
	/**
	 * 获取实例
	 * @param clz
	 * @return
	 */
	public static<T> T getInstance(Class<T> clz){
		
		try{
			return clz.newInstance();
		}catch(Exception e){
			e.printStackTrace();
		}
		return null;
	}
	
}
